import { ElMessage } from 'element-plus';
export default function (emit) {
  let handleDelete = (index, row) => {
    // state.projects = state.projects.filter((project) => project.uuid !== row.uuid);
    // localStorage.setItem('projects', JSON.stringify(state.projects));

    emit('remove-project', row.uuid);

    ElMessage({
      message: `${row.name} 已移除！`,
      type: 'success',
      duration: 1500,
    });
  };
  return {
    handleDelete,
  };
}
